# -*- coding:utf-8 -*-

"""
为什么前后不分离使用resutful风格不好
    1. 由于对单个操作的的时候通常是 更新，删除，查看单个同一条链接
"""

from django.urls import re_path
from rest_framework.urlpatterns import format_suffix_patterns
from .views import NeedAuthenticatedSchoolMateProfileListView, NeedAuthenticatedSchoolMateProfileDetailView, MyObtainTokenPairView

app_name = 'schoolmate'


urlpatterns = [
    # 登陆
    re_path(r'^login/$', MyObtainTokenPairView.as_view(), name='login'),
    # re_path(r'^login/refresh/$', TokenRefreshView.as_view(), name='token_refresh'),
    # re_path(r'^register/$', TokenRefreshView.as_view(), name='register'),
    # 提交验证信息
    re_path(r'^uasprofiles/$', NeedAuthenticatedSchoolMateProfileListView.as_view()),
    re_path(r'^uasprofiles/(?P<pk>[0-9]+)$', NeedAuthenticatedSchoolMateProfileDetailView.as_view()),
]

urlpatterns = format_suffix_patterns(urlpatterns)
